

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *

# import resources

from googlemaps import googleMap
from geonames import gnExtended
from osm import osmMap,osmeditMap
from flickrMap import flickrPics
from geoHack import geoHack

import doAbout

class ClickFuPlugin(object):
  def __init__(self, iface):
    # Save a reference to the QGIS iface
    self.iface = iface

  def initGui(self):
    # Create action
    self.menu=QMenu("Click-fu")

    self.googleMaps = googleMap(self.iface)
    self.gnExtended = gnExtended(self.iface)
    self.osmMap =osmMap(self.iface)
    self.osmeditMap =osmeditMap(self.iface)
    self.flickr = flickrPics(self.iface)
    self.geoHack = geoHack(self.iface)
    
    self.about = QAction("About ClickFu",self.iface.getMainWindow())
    QObject.connect(self.about,SIGNAL("triggered()"),self.clickAbout)

    self.menu.addActions([self.googleMaps, self.gnExtended, self.osmMap, self.osmeditMap, self.flickr, self.geoHack])
    self.menu.addSeparator()
    self.menu.addAction(self.about)
    
    menuBar = self.iface.getMainWindow().menuBar()
    menuBar.addMenu(self.menu)

  def clickAbout(self):
    d = doAbout.Dialog()
    d.exec_()

  def unload(self):
    # Remove the plugin
    pass


